<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div id="img"></div>
</body>
</html>
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<script>
    $(document).ready(function (){
        $.ajax({
            method:"get",
            url:"fileUpTest?action=showImage",
            type:"json",
            success:function (result){
                var imageNames = result.data;

                console.log(imageNames);

                var htmlText = "";
                for (let i = 0; i < imageNames.length; i++) {
                    htmlText += '<img src ="images/' +imageNames[i]+  '"/>'
                }
                console.log(htmlText);
                $("#img").html(htmlText);
            }
        });
    })


</script>

